<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title> Neo T RIA Demo Index </title>
<link href="../css/style.css" rel="stylesheet" />
</head>

<body>
<div class="sidebar">
    <div class="sidebar-inner" id="sidebar" style="padding-top:5px;"></div>
</div>

<div id="main" class="main">
    <p>流程图</p>
    
</div>
</body>
<script type="text/javascript" src="../../src/otr.js"></script>
<script type="text/javascript" src="../../src/otr/util.js"></script>
<script type="text/javascript" src="../../src/otr/client.js"></script>
<script type="text/javascript" src="../../src/otr/objective.js"></script>
<script type="text/javascript" src="../../src/otr/context.js"></script>
<script type="text/javascript" src="../../src/graph/graph.js"></script>
<script type="text/javascript" src="../../src/graph/shape/shape.js"></script>
<script type="text/javascript" src="../../src/graph/shape/line.js"></script>
<script type="text/javascript" src="../../src/graph/shape/polyline.js"></script>
<script type="text/javascript" src="../../src/graph/shape/text.js"></script>
<script type="text/javascript" src="../../src/graph/shape/rect.js"></script>
<script type="text/javascript" src="../../src/graph/shape/cycle.js"></script>
<script type="text/javascript" src="../../src/graph/shape/polygon.js"></script>
<script type="text/javascript" src="../../src/graph/adapter/adapter.js"></script>
<script type="text/javascript" src="../../src/graph/adapter/vml.js"></script>
<script type="text/javascript" src="../../src/graph/adapter/canvas.js"></script>
<script type="text/javascript" src="../../src/graph/brush.js"></script>
<script type="text/javascript" src="../../src/graph/adapter/canvas_brush.js"></script>
<script type="text/javascript" src="../../src/graph/adapter/vml_brush.js"></script>
<script type="text/javascript" src="../../src/chart/chart.js"></script>
<script type="text/javascript" src="../../src/chart/flow.js"></script>
<script type="text/javascript" src="../../src/chart/flow/node.js"></script>
<script type="text/javascript" src="../js/common.js"></script>

<script type="text/javascript">

// 画一个流程图
var flow = new OTR.Chart.Flow();

flow.addNode(new OTR.Chart.Flow.Node({
    type: OTR.Chart.Flow.TYPE.START,
    id: '^head',
    text: '开始'
}));

flow.addNode(new OTR.Chart.Flow.Node({
    type: OTR.Chart.Flow.TYPE.BRANCH,
    id: 's1',
    text: '审批款项',
    wayTrue: 's2',
    wayFalse: '^head'
}));

flow.addNode(new OTR.Chart.Flow.Node({
    type: OTR.Chart.Flow.TYPE.NODE,
    id: 's2',
    text: '财务拨款购买'
}));

flow.addNode(new OTR.Chart.Flow.Node({
    type: OTR.Chart.Flow.TYPE.NODE,
    id: 's3',
    text: '采购人员购买'
}));

flow.addNode(new OTR.Chart.Flow.Node({
    type: OTR.Chart.Flow.TYPE.BRANCH,
    id: 's4',
    text: '财务出款确认',
    wayFalse: 's3'
}));

flow.addNode(new OTR.Chart.Flow.Node({
    type: OTR.Chart.Flow.TYPE.BRANCH,
    id: 's5',
    text: '申请人确认',
    wayTrue: '^end',
    wayFalse: 's3'
}));

flow.addNode(new OTR.Chart.Flow.Node({
    type: OTR.Chart.Flow.TYPE.END,
    id: '^end',
    text: '结束'
}));

flow.renderTo(document.getElementById('main'));
</script>
</html>
